home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
- <!-- *****************************************************************************
- * Copyright (c) 2006-2009 Michel Gutierrez. All Rights Reserved.
- ****************************************************************************** -->
- <!DOCTYPE bindings SYSTEM "chrome://dwhelper/locale/dwhelper.dtd" >
-
- <bindings xmlns="http://www.mozilla.org/xbl"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns:xbl="http://www.mozilla.org/xbl">
-
- <binding id="PopupButton" extends="widgets.xml#widget">
-
- <xbl:content
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <box anonid="xButtonBox" onclick="this.parentNode.buttonClick()">
-
- <label xbl:inherits="value=label" anonid="xLabel" hidden="true"/>
- <image xbl:inherits="src=image" anonid="xImage" hidden="true" class="popup-button-image"/>
- <image class="popup-button-arrow"/>
-
- <menupopup anonid="xMenuPopup" class="popup-button-menupopup"
- onpopupshowing=""
- oncommand="setTimeout(function(pp){pp.hidePopup();},0,this)"
- onclick="">
-
- <xbl:children />
-
- </menupopup>
- </box>
-
- </xbl:content>
-
- <implementation>
-
- <constructor>
- <![CDATA[
- var label=this.getAttribute("label");
- if(label!=null && label.length>0)
- this.xLabel.setAttribute("hidden","false");
- var image=this.getAttribute("image");
- if(image!=null && image.length>0)
- this.xImage.setAttribute("hidden","false");
- ]]>
- </constructor>
-
- <method name="buttonClick">
- <body>
- <![CDATA[
- this.xMenuPopup.showPopup(this.xButtonBox,-1,-1,"popup","bottomleft","topleft");
- ]]>
- </body>
- </method>
-
- </implementation>
-
- </binding>
-
- </bindings>
-